% get threshold parameters for grids
function thresh = get_threshold(country)

    if strcmp(country, 'Mexico')
        thresh = 0;
    elseif strcmp(country, 'Chile')
        thresh = 0.02;
    elseif strcmp(country, 'Argentina')
        thresh = 0.4;
    elseif strcmp(country, 'Brazil')
        thresh = 0.2;
    elseif strcmp(country, 'Paraguay')
        thresh = 0;
    elseif strcmp(country, 'Ecuador')
        thresh = 0.2;
    elseif strcmp(country, 'Guatemala')
        thresh = 0.1;
    elseif strcmp(country, 'Costa Rica')
        thresh = 0.1;
    elseif strcmp(country, 'Panama')
        thresh = 0.1;
    elseif strcmp(country, 'Uruguay')
        thresh = 0.3;
    elseif strcmp(country, 'Venezuela')
        thresh = 0.1;
    elseif strcmp(country, 'Bolivia')
        thresh = 0.2;
    elseif strcmp(country, 'Nicaragua')
        thresh = 0.1;
    elseif strcmp(country, 'Guyana')
        thresh=0;
        %thresh = 0.025;
    elseif strcmp(country, 'Peru') || strcmp(country, 'Colombia')
        thresh=0.1;
    else
        thresh = 0;
    end
    
